package org.bookie.hibernate.config.entries;

import org.bookie.hibernate.config.ApplicableElement;
import org.hibernate.cfg.AnnotationConfiguration;

/**
 * Entity class initialized by Hivemind when reading contribution
 * 
 */
public class EntityClassElement implements ApplicableElement {

	@SuppressWarnings("unchecked")
	private Class clazz;

	public void applyTo(AnnotationConfiguration config) {
		config.addAnnotatedClass(clazz);
	}

	@SuppressWarnings("unchecked")
	public void setClazz(Class clazz) {
		this.clazz = clazz;
	}
	
	@SuppressWarnings("unchecked")
	public Class getClazz() {
		return clazz;
	}

	@Override
	public String toString() {
		return "HibernateClass(" + clazz.getName() + ")";
	}
}
